package com.entity;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the QA_ database table.
 * 
 */
@Entity
@Table(name="QA_")
@NamedQuery(name="Qa.findAll", query="SELECT q FROM Qa q")
public class Qa implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="QA__QAID_GENERATOR", sequenceName="SEQ",initialValue=1,allocationSize=1)
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="QA__QAID_GENERATOR")
	@Column(name="QA_ID")
	private long qaId;

	@Column(name="QA_ANSWER")
	private String qaAnswer;

	@Column(name="QA_CLASSIFY")
	private String qaClassify;

	@Column(name="QA_COUNT")
	private BigDecimal qaCount;

	@Column(name="QA_CUE")
	private String qaCue;

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name="QA_DATE")
	@JSONField(format="yyyy-MM-dd hh:mm:ss")
	private Date qaDate;

	@Column(name="QA_IFDELETE")
	private BigDecimal qaIfdelete;

	@Temporal(TemporalType.DATE)
	@Column(name="QA_INTODATE")
	private Date qaIntodate;

	@Column(name="QA_QUESTION")
	private String qaQuestion;

	@Column(name="QA_STATE")
	private BigDecimal qaState;

	@Column(name="QA_WRITER")
	private String qaWriter;

	//bi-directional many-to-one association to User
	@ManyToOne
	@JoinColumn(name="USER_ID")
	private User user;

	//用户id
	@Transient
	private Long userId1;
	//包含/不包含/大于/小于/等于/不等于
	@Transient
	private String idRange;
	//包含/不包含/大于/小于/等于/不等于
	@Transient
	private String countRange;

	//高级查询中分类的集合
	@Transient
	private List<Object> qaClassifyList;
	
	//高级查询中分类的集合
	@Transient
	private List<Object> qaStateList;

	public List<Object> getQaClassifyList() {
		return qaClassifyList;
	}

	public void setQaClassifyList(List<Object> qaClassifyList) {
		this.qaClassifyList = qaClassifyList;
	}

	public List<Object> getQaStateList() {
		return qaStateList;
	}

	public void setQaStateList(List<Object> qaStateList) {
		this.qaStateList = qaStateList;
	}
	
	public Long getUserId1() {
		return userId1;
	}

	public void setUserId1(Long userId1) {
		this.userId1 = userId1;
	}

	public String getIdRange() {
		return idRange;
	}

	public void setIdRange(String idRange) {
		this.idRange = idRange;
	}

	public String getCountRange() {
		return countRange;
	}

	public void setCountRange(String countRange) {
		this.countRange = countRange;
	}

	public Qa() {
	}

	public long getQaId() {
		return this.qaId;
	}

	public void setQaId(long qaId) {
		this.qaId = qaId;
	}

	public String getQaAnswer() {
		return this.qaAnswer;
	}

	public void setQaAnswer(String qaAnswer) {
		this.qaAnswer = qaAnswer;
	}

	public String getQaClassify() {
		return this.qaClassify;
	}

	public void setQaClassify(String qaClassify) {
		this.qaClassify = qaClassify;
	}

	public BigDecimal getQaCount() {
		return this.qaCount;
	}

	public void setQaCount(BigDecimal qaCount) {
		this.qaCount = qaCount;
	}

	public String getQaCue() {
		return this.qaCue;
	}

	public void setQaCue(String qaCue) {
		this.qaCue = qaCue;
	}

	public Date getQaDate() {
		return this.qaDate;
	}

	public void setQaDate(Date qaDate) {
		this.qaDate = qaDate;
	}

	public BigDecimal getQaIfdelete() {
		return this.qaIfdelete;
	}

	public void setQaIfdelete(BigDecimal qaIfdelete) {
		this.qaIfdelete = qaIfdelete;
	}

	public Date getQaIntodate() {
		return this.qaIntodate;
	}

	public void setQaIntodate(Date qaIntodate) {
		this.qaIntodate = qaIntodate;
	}

	public String getQaQuestion() {
		return this.qaQuestion;
	}

	public void setQaQuestion(String qaQuestion) {
		this.qaQuestion = qaQuestion;
	}

	public BigDecimal getQaState() {
		return this.qaState;
	}

	public void setQaState(BigDecimal qaState) {
		this.qaState = qaState;
	}

	public String getQaWriter() {
		return this.qaWriter;
	}

	public void setQaWriter(String qaWriter) {
		this.qaWriter = qaWriter;
	}

	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
}